package com.tx.spirnglcoud.mercuryclient.controller;

import com.tx.spirnglcoud.mercuryclient.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：tx
 * @description：
 * @date ：Created in 2019/5/16 14:34
 * @modified By：
 * @version:
 */
@RestController
@RefreshScope
public class UserController {

    @Value("${mercury.hello}")
    private String name;

    @Autowired
    IUserService userService;

    @RequestMapping("/hello")
    public String getUsers(){
        System.out.println(name);
        return userService.getUsers();
    }

}
